package com.medium.house.entity;

import com.medium.house.enums.BasicStatusEnum;
import com.medium.house.enums.HouseTypeEnum;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@Data
public class HousePriceRange implements Serializable {
    private Long id;

    private Integer code;

    private String name;

    private BigDecimal rangeStart;

    private BigDecimal rangeEnd;

    private HouseTypeEnum type;

    private BasicStatusEnum status;

    private String remark;

    private Date createdAt;

    private Date updatedAt;

    public HousePriceRange initialize()
    {
        code                          = 0;
        name                          = "";
        rangeStart                    = BigDecimal.valueOf(0, 3);
        rangeEnd                      = BigDecimal.valueOf(0, 3);
        type                          = HouseTypeEnum.SECONDHAND;
        status                        = BasicStatusEnum.ENABLED;
        remark                        = "";
        createdAt                     = new Date();
        updatedAt                     = new Date();
        return this;
    }
}